package ptij.verifier.test.grammar;

import ptolemy.actor.*;
import ptolemy.kernel.*;
import ptolemy.kernel.util.*;

import java.io.*;

public class Try2 extends AtomicActor {

   public Try2(CompositeEntity container, String name) throws
           NameDuplicationException, IllegalActionException {
       super(container, name);
   }

   
   public void fire() throws IllegalActionException {
       int a = 2;       
       File f;

       try {
           int [] v = new int[10];	   
	   v[1] = 1;	   
       }
       catch(NullPointerException ex) {
            System.out.println(ex);
       }
       catch(OutOfMemoryError ex2) {
          int d = 3;
       }
       catch(NegativeArraySizeException e3) {
           System.out.println("sdf");
       }
       catch(ArrayStoreException ex4) {
         int d = 3;
       }

       try {
           int [] v = new int[10];
           if(v[5] == 3) {
	       System.out.println("oi");
	   }       
       }
       catch(NullPointerException ex) {
           System.out.println(ex);
       }


       try {
           int [] v = new int[10];
           do {
	       int x1 = 1;
	   } while(v[5] > 23);	   
       }
       catch(ArrayIndexOutOfBoundsException ex) {
           System.out.println(ex);
       }


       try {
           int [] ax = new int[10];
	   for(int i = 10/3;i < ax[2];i =  i + ax[10]) {
	       System.out.println("sdf");
	   }              
       }
       catch(ArrayIndexOutOfBoundsException ex) {
           System.out.println(ex);
       }    
       catch(ArithmeticException eax) {
           
       }  


       try {
           int [] ax = new int[10];
	   while(10 < ax[2]/3) {
	       System.out.println("sdf");
	   }              
       }
       catch(ArrayIndexOutOfBoundsException ex) {
           System.out.println(ex);
       }    
       catch(ArithmeticException eax) {
           
       }         


       try {       
           System.out.println("oi");	   
       }
       finally {
          System.out.println("que merda");
       }

   }
   
 
   
   private boolean metodoBool() {
       return true;
   }
   
   
   private boolean boolV = false;
}
